home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 March / CMCD0304.ISO / Software / Freeware / Programare / nullsoft / nsis20.exe / Examples / Modern UI / Basic.nsi next >
Text File  |  2004-02-06  |  2KB  |  85 lines

  1. ;NSIS Modern User Interface version 1.70
  2. ;Basic Example Script
  3. ;Written by Joost Verburg
  4.  
  5. ;--------------------------------
  6. ;Include Modern UI
  7.  
  8.   !include "MUI.nsh"
  9.  
  10. ;--------------------------------
  11. ;General
  12.  
  13.   ;Name and file
  14.   Name "Modern UI Test 1.70"
  15.   OutFile "Basic.exe"
  16.  
  17.   ;Default installation folder
  18.   InstallDir "$PROGRAMFILES\Modern UI Test"
  19.   
  20.   ;Get installation folder from registry if available
  21.   InstallDirRegKey HKCU "Software\Modern UI Test" ""
  22.  
  23. ;--------------------------------
  24. ;Interface Settings
  25.  
  26.   !define MUI_ABORTWARNING
  27.  
  28. ;--------------------------------
  29. ;Pages
  30.  
  31.   !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt"
  32.   !insertmacro MUI_PAGE_COMPONENTS
  33.   !insertmacro MUI_PAGE_DIRECTORY
  34.   !insertmacro MUI_PAGE_INSTFILES
  35.   
  36.   !insertmacro MUI_UNPAGE_CONFIRM
  37.   !insertmacro MUI_UNPAGE_INSTFILES
  38.   
  39. ;--------------------------------
  40. ;Languages
  41.  
  42.   !insertmacro MUI_LANGUAGE "English"
  43.  
  44. ;--------------------------------
  45. ;Installer Sections
  46.  
  47. Section "Dummy Section" SecDummy
  48.  
  49.   SetOutPath "$INSTDIR"
  50.   
  51.   ;ADD YOUR OWN FILES HERE...
  52.   
  53.   ;Store installation folder
  54.   WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR
  55.   
  56.   ;Create uninstaller
  57.   WriteUninstaller "$INSTDIR\Uninstall.exe"
  58.  
  59. SectionEnd
  60.  
  61. ;--------------------------------
  62. ;Descriptions
  63.  
  64.   ;Language strings
  65.   LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."
  66.  
  67.   ;Assign language strings to sections
  68.   !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  69.     !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
  70.   !insertmacro MUI_FUNCTION_DESCRIPTION_END
  71.  
  72. ;--------------------------------
  73. ;Uninstaller Section
  74.  
  75. Section "Uninstall"
  76.  
  77.   ;ADD YOUR OWN FILES HERE...
  78.  
  79.   Delete "$INSTDIR\Uninstall.exe"
  80.  
  81.   RMDir "$INSTDIR"
  82.  
  83.   DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
  84.  
  85. SectionEnd